using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TanashCMS.Business;

public partial class manager_websites_Default : CMSManagementPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void odsWebsites_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
    {
        if (User.IsInRole("administrator"))
        {
            e.InputParameters["CustomerID"] = 0;
        }
    }

    protected void odsWebPages_Selecting(object sender, ObjectDataSourceSelectingEventArgs e)
    {
        if (gvWebsites.EditIndex != -1)
        {
            e.InputParameters["WebsiteID"] = (int)gvWebsites.DataKeys[gvWebsites.EditIndex].Value;
        }
    }
    protected void DropDownList4_DataBinding(object sender, EventArgs e)
    {

    }
    protected void gvWebsites_RowUpdating(object sender, GridViewUpdateEventArgs e)
    {


    }
    protected void gvWebsites_RowDataBound(object sender, GridViewRowEventArgs e)
    {

    }
    protected void ddlCustomer_SelectedIndexChanged(object sender, EventArgs e)
    {
        gvWebsites.DataBind();
    }
    protected void fvWebsite_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        string newImageFolder = Server.MapPath(Request.ApplicationPath.TrimEnd('/') + "/UserImages/" + e.Values["SubFolderName"]);
        if (!System.IO.Directory.Exists(newImageFolder))
        {
            System.IO.Directory.CreateDirectory(newImageFolder);
        }
    }
}
